﻿<Window x:Class="ApexWizards.ViewAndViewModelWizard.ViewAndViewModelWizardView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:ApexWizards.ViewAndViewModelWizard"
        xmlns:apexControls="clr-namespace:Apex.Controls;assembly=Apex"
        TextOptions.TextFormattingMode="Display"
        Title="New View and View Model" Height="400" Width="500"
        FontFamily="Segoe UI" ResizeMode="NoResize" WindowStartupLocation="CenterOwner"
        FocusManager.FocusedElement="{Binding ElementName=textBoxBaseName}">
    
    <Window.DataContext>
        <local:ViewAndViewModelWizardViewModel x:Name="viewModel" />
    </Window.DataContext>    
    
    <apexControls:ApexGrid Rows="Auto,*,Auto">
        
        <!-- Top block of color. -->
        <apexControls:MultiBorder Grid.Row="0" Height="60" Background="#FFFFFF">

            <apexControls:ApexGrid Rows="Auto" Columns="*,Auto">
                <TextBlock Grid.Row="0" FontWeight="Light" Text="New View Model" VerticalAlignment="Center" Margin="20,0,0,0" FontSize="24" />
                <Image Grid.Column="1" Source="/ApexWizards;component/Apex.png" Stretch="None" RenderOptions.BitmapScalingMode="NearestNeighbor" />
            </apexControls:ApexGrid>

        </apexControls:MultiBorder>
        
        
        <!-- Main content. -->
        <apexControls:MultiBorder Grid.Row="1"
                                  BorderThicknessTop="1" BorderBrushTop="#dadada"
                                  BorderThicknessBottom="1" BorderBrushBottom="#b8c2d5">
            <apexControls:MultiBorder.Background>
                <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                    <GradientStop Offset="0" Color="#f1f1f1" />
                    <GradientStop Offset="0.2" Color="#ffffff" />
                    <GradientStop Offset="0.4" Color="#fbfcfe" />
                    <GradientStop Offset="1" Color="#ccd7ec" />
                </LinearGradientBrush>
            </apexControls:MultiBorder.Background>

            <apexControls:ApexGrid Grid.Row="2" Columns="*,2*" Rows="Auto,Auto,Auto,Auto,Auto" Margin="20">

                <TextBlock Grid.Row="0" Grid.ColumnSpan="2" TextWrapping="Wrap">Enter a base name below and press OK to createa a view
                    and view model pair.</TextBlock>

                <Label Grid.Row="1" Margin="12" Grid.Column="0" Content="Base Name" />
                <TextBox 
                    x:Name="textBoxBaseName" Grid.Row="1" Margin="12" Grid.Column="1" 
                    Text="{Binding BaseName, UpdateSourceTrigger=PropertyChanged}" />
                <Label Grid.Row="2" Margin="12" Grid.Column="0" Content="View Model Name" />
                <TextBox 
                    Grid.Row="2" Margin="12" Grid.Column="1" 
                    Text="{Binding ViewModelName}" />
                <Label Grid.Row="3" Margin="12" Grid.Column="0" Content="View Model Name" />
                <TextBox 
                    Grid.Row="3" Margin="12" Grid.Column="1" 
                    Text="{Binding ViewName}" />
                <CheckBox Grid.Row="4" Margin="12" Grid.ColumnSpan="2" Grid.Column="0" IsChecked="{Binding ViewCreatesViewModel}" Content="View Creates ViewModel" />


            </apexControls:ApexGrid>

        </apexControls:MultiBorder>

        <apexControls:MultiBorder Grid.Row="2" Height="50" Background="#ccd7ec"
                                  BorderThicknessTop="1" BorderBrushTop="#dce3f2" Padding="20,0,20,0">
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
                <Button Command="{Binding OKCommand}" Margin="0,0,8,0" Width="80" Height="24" Content="OK" HorizontalAlignment="Right" IsDefault="True" />
                <Button Command="{Binding CancelCommand}" Width="80" Height="24" Content="Cancel" HorizontalAlignment="Right" />
            </StackPanel>

            
        </apexControls:MultiBorder>
        
    </apexControls:ApexGrid>
    
</Window>
